﻿using System;
using System.Collections.ObjectModel;
using Reflector.CodeModel;

namespace CallGraphExtractor.CecilAdapter
{
    class ModuleCollection : Collection<IModule>, IModuleCollection
    {
        private Collection<Mono.Cecil.ModuleDefinition> collection;

        public ModuleCollection(Collection<Mono.Cecil.ModuleDefinition> collection, IAssembly assembly)
        {
            this.collection = collection;
            foreach (var item in collection)
            {
                this.Add(new Module(item, assembly));
            }
        }


        #region IModuleCollection Members


        public void AddRange(System.Collections.ICollection value)
        {
            throw new NotSupportedException();
        }

        public new void Remove(IModule value)
        {
            throw new NotSupportedException();
        }

        #endregion
    }
}
